﻿<UserControl x:Class="WeatherClockWidget.ForecastItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             MouseLeftButtonDown="UserControl_MouseLeftButtonDown">
    <Grid Style="{DynamicResource ForecastItemBaseStyle}">
        <Image Name="Icon" Source="Skins\Sense\Weather\weather_1.png" Style="{DynamicResource ForecastItemIconStyle}">
            <Image.RenderTransform>
                <TranslateTransform x:Name="Transform"/>
            </Image.RenderTransform>
            <Image.Resources>
                <Storyboard x:Key="FlipAnim1">
                    <DoubleAnimation x:Name="TransformAnim1" Storyboard.TargetName="Transform" Storyboard.TargetProperty="Y" From="0" To="10" Duration="0:0:0.3" Completed="DoubleAnimation_Completed"/>
                    <DoubleAnimation x:Name="OpacityAnim1" Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.3"/>
                </Storyboard>
                <Storyboard x:Key="FlipAnim2">
                    <DoubleAnimation x:Name="TransformAnim2" Storyboard.TargetName="Transform" Storyboard.TargetProperty="Y" From="-10" To="0" Duration="0:0:0.3"/>
                    <DoubleAnimation x:Name="OpacityAnim2" Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.3"/>
                </Storyboard>
            </Image.Resources>
        </Image>
        <Grid Style="{DynamicResource ForecastItemDayGridStyle}">
            <TextBlock Name="DayShadow" Style="{DynamicResource ForecastItemDayShadowStyle}" Text="{Binding ElementName=Day, Path=Text}"/>
            <TextBlock Name="Day" Style="{DynamicResource ForecastItemDayStyle}" Text="Mon"/>
        </Grid>
        <StackPanel Style="{DynamicResource ForecastItemTemperaturePanelStyle}">
            <Grid Style="{DynamicResource ForecastItemTemperatureHGridStyle}">
                <TextBlock Name="TemperatureHShadow" Style="{DynamicResource ForecastItemTemperatureHShadowStyle}" Text="{Binding ElementName=TemperatureH, Path=Text}"/>
                <TextBlock Name="TemperatureH" Style="{DynamicResource ForecastItemTemperatureHStyle}" Text="0⁰"/>
            </Grid>
            <Grid Style="{DynamicResource ForecastItemTemperatureLGridStyle}">
                <TextBlock Name="TemperatureLShadow" Style="{DynamicResource ForecastItemTemperatureLShadowStyle}" Text="{Binding ElementName=TemperatureL, Path=Text}"/>
                <TextBlock Name="TemperatureL" Style="{DynamicResource ForecastItemTemperatureLStyle}" Text="0⁰"/>
            </Grid>
        </StackPanel>
    </Grid>
</UserControl>
